const getters = {
  /**
   * 用户数据
   * @returns {*}
   */
  user: state => state.user,
  /**
   * token
   * @returns {String}
   */
  token: state => state.user.token,
  /**
   * 是否登录
   * @returns {Boolean}
   */
  isLogin: state => state.user.token ? true : false,
  /**
   * toast 数据
   */
  vuxToast: state => state.vux.toast,
  /**
   * loading 数据
   */
  vuxLoading: state => state.vux.loading,
  /**
   * socket 访客姓名
   */
  messageVisitorName: state => state.message.visitorName,
  /**
   * 消息数据
   */
  messageDataArr: state => state.message.dataArr,
  /**
   * 获取当前用户的消息ID
   */
  messageCurrentClientId: state => state.message.currentClientId,
  /**
   * 获取所有客户端
   */
  messageClients: state => state.message.clients,
  /**
   * 唯独消息树
   */
  massageUnreadCount: state => state.message.unreadCount
}
export default getters
